package cn.tedu.submarine_2;

import javax.swing.*;

/**
 * 水雷类
 */
public class Mine extends SeaObject{

    public Mine(int x,int y) {
        super(11,11,x,y,1);
    }


    public void move() {
        y-=speed;//水雷向上移动
    }


    public ImageIcon getImage() {
        return Images.mine;
    }

    /**
     * 检测水雷是否越界
     * @return
     */
    public boolean isOutOfBounds(){
        return this.y<=150-this.height;//水雷的y<=150-水雷的高度
    }
}
